package com.eastdigit.org.model;

import com.eastdigit.system.model.Entity;
import com.eastdigit.system.model.IEmployee;
import net.sf.json.JSONObject;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Employee extends Entity implements IEmployee, Serializable {
    private String id;

    private String code;

    private String name;

    private String gender;

    private String telephone;

    private String mobile1;

    private String mobile2;

    private String email;

    private String state;

    private String extra1;

    private String extra2;

    private List<EmployeePos> employeePos = new ArrayList<EmployeePos>();

    private static final long serialVersionUID = 1L;

    @Override
    public String getEmpId() {
        return id;
    }

    @Override
    public String getEmpName() {
        return name;
    }

    public JSONObject toJSONObject() {
        JSONObject json = new JSONObject();
        json.put("id", id);
        json.put("code", code);
        json.put("name", name);
        json.put("gender", gender);
        json.put("telephone", telephone);
        json.put("mobile1", mobile1);
        json.put("mobile2", mobile2);
        json.put("email", email);
        json.put("state", state);
        json.put("extra1", extra1);
        json.put("extra2", extra2);
        return json;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getMobile1() {
        return mobile1;
    }

    public void setMobile1(String mobile1) {
        this.mobile1 = mobile1;
    }

    public String getMobile2() {
        return mobile2;
    }

    public void setMobile2(String mobile2) {
        this.mobile2 = mobile2;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getExtra1() {
        return extra1;
    }

    public void setExtra1(String extra1) {
        this.extra1 = extra1;
    }

    public String getExtra2() {
        return extra2;
    }

    public void setExtra2(String extra2) {
        this.extra2 = extra2;
    }

    @Override
    public List<EmployeePos> getEmployeePos() {
        return employeePos;
    }

    public void addEmployeePos(EmployeePos employeePos) {
        this.employeePos.add(employeePos);
    }
}
